package com.fresh.bus.chat.business;

abstract class KeyUtils {

	static final String UID = "uid:"; // 用户

	static final String CID = "cid:"; // 城市

	static final String LID = "lid:"; // 巴士线路

	static final String SID = "sid:"; // 站点

	static final String RID = "rid:"; // 聊天房间

	static final String MID = "mid:"; // 评论备注

	static final String FID = "fid:"; // 纸飞机
	
	static final String TID = "tid:"; // 心愿树

	static final String RPID = "rpid:"; // 纸飞机回复

	static final String ASSO = "asso:"; // 关系

	static String uid(String id) {
		return UID + id;
	}
	
	static String tid(String id) {
		return TID + id;
	}	
	
	static String auth(String uid) {
		return UID + uid + ":auth";
	}

	static String comments(String uid) {
		return UID + uid + ":comments";
	}

	public static String report(String uid) {
		return UID + uid + ":report";
	}

	// 谈话前候选对象
	static String fans(String uid) {
		return UID + uid + ":fans";
	}

	static String feijis(String uid) {
		return UID + uid + ":feijis";
	}

	// 房间队列
	static String queue(String rid) {
		return RID + rid + ":queue";
	}

	static String stations(String lid) {
		return LID + lid + ":stations";
	}

	static String lines(String sid) {
		return SID + sid + ":lines";
	}

	static String rooms(String sid) {
		return SID + sid + ":rooms";
	}

	static String females(String rid) {
		return RID + rid + ":females";
	}

	static String males(String rid) {
		return RID + rid + ":males";
	}

	static String areaGroup(String province,String sex) {
		return "area:" + province + ":" + sex;
	}
	
	static String lid(String id) {
		return LID + id;
	}

	static String cid(String id) {
		return CID + id;
	}

	static String asso(String id, String to) {
		return ASSO.concat(id).concat(":").concat(to);
	}

	static String sid(String id) {
		return SID + id;
	}

	static String rid(String id) {
		return RID + id;
	}

	static String mid(String id) {
		return MID + id;
	}

	static String fid(String id, String from, String to, String date) {
		return FID + id + ":" + from + ":" + to + ":" + date;
	}

	static String rpid(String id) {
		return RPID + id;
	}

	static String authKey(String auth) {
		return "auth:" + auth;
	}

	public static String user(String name) {
		return "user:" + name + ":uid";
	}

	public static String line(String name) {
		return "line:" + name + ":lid";
	}

	public static String station(String name) {
		return "station:" + name + ":sid";
	}

	static String names() {
		return "names";
	}

	static String sessions() {
		return "sessions";
	}

	static String users() {
		return "users";
	}
	
	static String synUsers() {
		return "synusers";
	}
	
	static String trees() {
		return "trees";
	}	

	static String logins() {
		return "logins";
	}

	static String cities() {
		return "cities";
	}

	static String lines() {
		return "lines";
	}

	static String topics() {
		return "topics";
	}

	static String feijis() {
		return "feijis";
	}
	
	static String femaleFeijis() {
		return "feijis:female";
	}
	
	static String maleFeijis() {
		return "feijis:male";
	}	

	static String replys() {
		return "replys";
	}

	static String stations() {
		return "stations";
	}

	static String rooms() {
		return "rooms";
	}

	static String timeline() {
		return "timeline";
	}

	static String globalUid() {
		return "global:uid";
	}

	static String globalPid() {
		return "global:pid";
	}

	static String globalCid() {
		return "global:cid";
	}

	// bus line id
	static String globalLid() {
		return "global:lid";
	}

	// station id
	static String globalSid() {
		return "global:sid";
	}

	static String globalMid() {
		return "global:mid";
	}

	static String alsoFollowed(String uid, String targetUid) {
		return UID + uid + ":also:uid:" + targetUid;
	}

	static String commonFollowers(String uid, String targetUid) {
		return UID + uid + ":common:uid:" + targetUid;
	}
}
